<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2016-10-02
 * Time: 16:08
 */

namespace app\index\controller;


use app\domain\WxpayDomain;
use app\src\account\enmu\AccountEnmu;
use app\src\alibaichuan\service\OpenIMUserService;
use app\src\consumehistory\logic\ConsumeHistoryLogic;
use app\src\filiation\action\FiliationAction;
use app\src\insurance\action\InsuranceAction;
use app\src\insurance\logic\InsuranceApplyLogic;
use app\src\insurance\logic\InsuranceLogic;
use app\src\invite\logic\InviteCodeLogic;
use app\src\platform\logic\PlatformLogic;
use app\src\profit\action\ProfitAction;
use app\src\profit\enum\ProfitEnum;
use app\src\profit\logic\ProfitLogic;
use app\src\rfpay\po\RfNoCardBalanceReq;
use app\src\rfpay\po\RfNoCardOrderCreateReq;
use app\src\rfpay\service\RfNoCardOrderService;
use app\src\rfpay\utils\RsaUtils;
use app\src\seller\logic\SellerLogic;
use app\src\seller\logic\SellerOrderLogic;
use app\src\seller\model\SellerOrder;
use app\src\tool_email\helper\EmailHelper;
use app\src\user\enum\RoleEnum;
use app\src\user\logic\MemberConfigLogic;
use app\src\userRoles\logic\UserRolesLogic;
use think\Controller;

class Insurance extends Controller
{

    public function test(){
        $result=(new InsuranceAction())->UserList('2','2');
        dump($result);
    }

    public function sellertest(){
        $order_info=[
            'uid' => 2,
            'amount' => '321',
            'note' => 'ceshi',
        ];
        $result=(new SellerOrderLogic())->addOrder(1,$order_info);
        dump($result);
    }

    public function wxpaytest(){
        $r=(new WxpayDomain())->prePay();
        dump($r);
    }

    public function historytest(){
        $order_code=input('code');
        $r=(new ConsumeHistoryLogic())->seller_history($order_code);
        dump($r);
    }

    public function Profittest(){
        $result = (new ProfitAction())->dealProfit(ProfitEnum::SELLER_TYPE, 36, 15, 235);
        $profit = (new ProfitLogic())->getInfo(['id'=>$result['info']]);
        dump($profit);

    }
}